home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- //
- // Creation Date: July 7, 1997
- // Author: sw
- //
- // Procedure Name:
- // AEperParticleNew
- //
- // Description:
- // Creates attribute editor controls for perParticle Attributes
- //
- // Input Value:
- // attributeUIName
- // attributeType (vector, float)
- // perParticleAttr (nodeName + attributeName)
- //
- // Output Value:
- // None
- //
-
-
- global proc AEperParticleNew ( string $attributeUIName,
- string $type,
- string $perParticleAttr )
- {
- string $nodeName[];
- tokenize($perParticleAttr, ".", $nodeName);
- string $layoutName = ($nodeName[1] + "RowLayout");
-
- if (`attributeQuery -exists -node $nodeName[0] $nodeName[1]`) {
- setUITemplate -pst attributeEditorPresetsTemplate;
-
- rowLayout -nc 4 -vis 0
- -cat 1 right 5
- -cat 2 both 0
- -cat 3 both 0
- -cat 4 both 0
- $layoutName;
- text -l $attributeUIName ;
- button -l "Expr. Ed..."
- -c ( "particleExpressionEditor " + $perParticleAttr )
- ($nodeName[1] + "ExprEditButton");
- button -l "Comp. Ed..."
- -c "componentEditorWindow"
- ($nodeName[1] + "CompEditButton");
- button -l "Ramp..."
- -c ("ArrayMapperWnd "
- + $nodeName[0] + " "
- + $nodeName[1] )
- ($nodeName[1] + "RampButton");
- setParent ..;
- rowLayout -e -vis 1 $layoutName;
- setUITemplate -ppt;
- }
- }
-
-
-
- global proc AEperParticleReplace ( string $attributeUIName,
- string $type,
- string $perParticleAttr )
- {
- string $nodeName[];
- tokenize($perParticleAttr, ".", $nodeName);
- string $layoutName = ( $nodeName[1] + "RowLayout" );
-
- if (`attributeQuery -exists -node $nodeName[0] $nodeName[1]`) {
- if (`rowLayout -exists $layoutName`) {
- button -e -c ( "particleExpressionEditor "
- + $perParticleAttr )
- ($nodeName[1] + "ExprEditButton");
- button -e -c "componentEditorWindow"
- ($nodeName[1] + "CompEditButton");
- button -e -c ("ArrayMapperWnd "
- + $nodeName[0] + " "
- + $nodeName[1] )
- ($nodeName[1] + "RampButton");
- } else {
- AEperParticleNew $attributeUIName
- $type
- $perParticleAttr;
- }
- } else if (`rowLayout -exists $layoutName`){
- rowLayout -e -vis 0 $layoutName;
- deleteUI -layout $layoutName;
- }
- }
-
-
-